package secret

import (
	"crypto/md5"
	"fmt"
)

var secretKey = "D?G:C0ZSkKa(%?W"

func Md5(str string) string {
	b := []byte(fmt.Sprintf("%s%s", secretKey, str))
	has := md5.Sum(b)
	return fmt.Sprintf("%x", has)
}

func Verify(origin, has string) bool {
	return has == Md5(origin)
}
